﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Qianli.DirSir.Model;
using System.Data;
namespace 千里马后台
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IService1”。
    [ServiceContract]
    public interface IService1
    {
        #region 用户管理
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="u">前台传过来的用户集合</param>
        /// <returns></returns>
        [OperationContract]
        int Login(Userinfo u);
        /// <summary>
        /// 根据用户名和密码获取用户编号
        /// </summary>
        /// <param name="u"></param>
        /// <returns></returns>
        [OperationContract]
        int GetUserID(Userinfo u);
        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="u"></param>
        /// <returns></returns>
        [OperationContract]
        int Register(Userinfo u);
        #endregion

        #region 店铺管理
        /// <summary>
        /// 显示店铺信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<StoreInfo> ShowStoreInfo();
        #endregion

        #region 仓库管理
        /// <summary>
        /// 显示仓库信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<StorehouseInfo> Storehouseshow();
        /// <summary>
        /// 添加仓库
        /// </summary>
        /// <param name="Shinfo"></param>
        /// <returns></returns>
        [OperationContract]
        int StorehouseAdd(StorehouseInfo Shinfo);
        /// <summary>
        /// 根据id获取仓库信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        StorehouseInfo StorehouseGetID(int id);
        /// <summary>
        /// 修改仓库信息
        /// </summary>
        /// <param name="Shinfo"></param>
        /// <returns></returns>
        [OperationContract]
        int StorehouseUpdate(StorehouseInfo Shinfo);
        /// <summary>
        /// 根据id删除仓库
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        int StorehouseDelete(int id);
        /// <summary>
        /// 按条件搜索显示
        /// </summary>
        /// <param name="SthName"></param>
        /// <returns></returns>
        [OperationContract]
        List<StorehouseInfo> StorehouseInfoSelect(string SthName, string Sthcoding);
        #endregion

        #region 采购订单管理
        /// <summary>
        /// 获取供应商信息，填充到下拉列表中
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<ProviderInfo> GetProviderInfo();
        /// <summary>
        /// 采购订单显示
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<StockOrderInfo> StockOrderInfoShow();
        /// <summary>
        /// 采购订单添加
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        [OperationContract]
        List<int> AddStockOrderInfo(StockOrderInfo StockOrderInfo, List<PurchaseOrderSheetInfo> listPurchaseOrderSheetInfo);
        /// <summary>
        /// 采购订单表删除
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<int> DelStockOrderInfo(int StockOrderID);
        /// <summary>
        /// 查看订单子表详细信息
        /// </summary>
        /// <param name="StockOrderID"></param>
        /// <returns></returns>
        [OperationContract]
        List<PurchaseOrderSheetInfo> GetlistPurchaseOrderSheetInfoByStockOrderID(int StockOrderID);
        /// <summary>
        /// 查看入库订单子表详细信息
        /// </summary>
        /// <param name="StockOrderID"></param>
        /// <returns></returns>
        [OperationContract]
        List<PurchaseOrderSheetInfo> GetlistPurByStockOrderID(int StockOrderID);
        /// <summary>
        /// 获取采购订单主表信息
        /// </summary>
        /// <param name="StockOrderID"></param>
        /// <returns></returns>
        [OperationContract]
        List<StockOrderInfo> GetStockOrderByStockOrderID(int StockOrderID);
        /// <summary>
        /// 修改采购订单信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<int> UpdatePurchaseOrderSheetInfo(StockOrderInfo s, List<PurchaseOrderSheetInfo> listPurchaseOrderSheetInfo);
        /// <summary>
        /// 根据采购订单模糊查询
        /// </summary>
        /// <param name="StockOrderName"></param>
        /// <returns></returns>
        [OperationContract]
        List<StockOrderInfo> GetStockOrderByStockOrderName(string DocumentsCoding);
        /// <summary>
        /// 初次审核
        /// </summary>
        /// <param name="StockOrderID"></param>
        /// <param name="listPurchaseOrderSheetInfo"></param>
        /// <returns></returns>
        [OperationContract]
        List<int> UpdPurchaseOrderSheetInfoByStockOrderID(int StockOrderID, List<PurchaseOrderSheetInfo> listPurchaseOrderSheetInfo);
        /// <summary>
        /// 根据采购订单子表编号获取信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        PurchaseOrderSheetInfo GetPurchaseOrderSheetByPurchaseOrderSheetID(int id);
        /// <summary>
        /// 入库订单显示
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<StockOrderInfo> StockOrderInfoShowFalse();
        /// <summary>
        /// 导出excel
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        DataSet GetExcel();
        #endregion

        #region 供应商管理
        /// <summary>
        /// 供应商显示
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<ProviderInfo> ProviderInfoShow();
        /// <summary>
        /// 添加供应商
        /// </summary>
        /// <param name="Shinfo"></param>
        /// <returns></returns>
        [OperationContract]
        int ProviderInfoAdd(ProviderInfo Provd);
        /// <summary>
        /// 根据id获取数据
        /// </summary>
        /// <param name="Proid"></param>
        /// <returns></returns>
        [OperationContract]
        ProviderInfo ProviderInfoGetID(int Proid);
        /// <summary>
        /// 修改供应商信息
        /// </summary>
        /// <param name="Provd"></param>
        /// <returns></returns>
        [OperationContract]
        int ProviderInfoUpdate(ProviderInfo Provd);
        /// <summary>
        /// 根据ID删除
        /// </summary>
        /// <param name="Proid"></param>
        /// <returns></returns>
        [OperationContract]
        int ProviderInfoDelete(int Proid);
        /// <summary>
        /// 模糊查询
        /// </summary>
        /// <param name="ProName"></param>
        /// <returns></returns>
        [OperationContract]
        List<ProviderInfo> ProviderInfoSelect(string ProName);
        #endregion

        #region 商品管理
        /// <summary>
        /// 显示商品信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<GoodsInfo> Goodshow();
        /// <summary>
        /// 显示商品分类
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<GoodsTypeInfo> showGoodsType();
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="ss"></param>
        /// <returns></returns>
        [OperationContract]
        int addGoods(GoodsInfo ss);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        int deleteGoods(int id);
        /// <summary>
        /// 根据id获取goods表信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        GoodsInfo GetGoodsByID(int id);
        /// <summary>
        /// 修改物品信息
        /// </summary>
        /// <param name="g"></param>
        /// <returns></returns>
        [OperationContract]
        int UptGoods(GoodsInfo g);
        /// <summary>
        /// 根据姓名搜索物品表信息
        /// </summary>
        /// <param name="GoodsName"></param>
        /// <returns></returns>
        [OperationContract]
        List<GoodsInfo> SearchGoods(string GoodsName);
        /// <summary>
        /// 根据商品编号获取goods表信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        List<GoodsInfo> GetGoodsByGoodsCoding(string GoodsCoding);
        #endregion

        #region 快递管理
        /// <summary>
        ///获取快递公司信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<DHLUPSFEDEXEMSInfo> GetDHLUPSFEDEXEMSInfo();
        /// <summary>
        /// 添加快递公司信息
        /// </summary>
        /// <param name="dh"></param>
        /// <returns></returns>
        [OperationContract]
        int AddDHLUPSFEDEXEMSInfo(DHLUPSFEDEXEMSInfo dh);
        /// <summary>
        /// 根据快递编号删除快递公司
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        int DelDHLUPSFEDEXEMSInfo(int id);
        /// <summary>
        /// 根据id搜索快递表信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        DHLUPSFEDEXEMSInfo getDHLUPSFEDEXEMSInfoByid(int id);
        /// <summary>
        /// 修改快递表信息
        /// </summary>
        /// <param name="dh"></param>
        /// <returns></returns>
        [OperationContract]
        int UptDHLUPSFEDEXEMSInfo(DHLUPSFEDEXEMSInfo dh);
        /// <summary>
        /// 根据姓名查询
        /// </summary>
        /// <param name="DHLUPSFEDEXEMSName"></param>
        /// <returns></returns>
        [OperationContract]
        List<DHLUPSFEDEXEMSInfo> SearchDHLUPSFEDEXEMSInfo(string DHLUPSFEDEXEMSName);
        #endregion

        #region 客户管理
        /// <summary>
        /// 显示客户信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<CustomersInfo> ShowCustomersInfo();
        /// <summary>
        /// 显示城市信息
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<CityInfo> ShowCity();
        /// <summary>
        /// 添加客户信息
        /// </summary>
        /// <param name="cust"></param>
        /// <returns></returns>
        [OperationContract]
        int AddCustomersInfo(CustomersInfo cust);
        /// <summary>
        /// 删除客户信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        int DelCustomersInfo(int id);
        /// <summary>
        /// 根据id获取客户信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        CustomersInfo GetCustomersInfoByid(int id);
        /// <summary>
        /// 修改客户信息
        /// </summary>
        /// <param name="cust"></param>
        /// <returns></returns>
        [OperationContract]
        int UptCustomersInfo(CustomersInfo cust);
        /// <summary>
        /// 根据姓名搜索客户信息
        /// </summary>
        /// <param name="CustomersName"></param>
        /// <returns></returns>
        [OperationContract]
        List<CustomersInfo> GetCustomersInfoByCustomersName(string CustomersName);
        #endregion

        #region 销售订单管理
        /// <summary>
        /// 添加商品订单信息
        /// </summary>
        /// <param name="oo"></param>
        /// <returns></returns>
        [OperationContract]
        int AddOrderInfo(OrderInfo oo, string xml);
        /// <summary>
        /// 获取订单信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        List<OrderInfo> ShowOrderInfo();
        /// <summary>
        /// 根据ID获取订单子表信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        List<OrderSonInfo> oo(int id);
        /// <summary>
        /// 根据ID获取订单主表信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        OrderInfo GetOrderInfoByid(int id);
        /// <summary>
        /// 商品入库，增加库存数量
        /// </summary>
        /// <param name="orderID"></param>
        /// <returns></returns>
        [OperationContract]
        int Add_ruku(int orderID);

        [OperationContract]
        /// <summary>
        /// 根据年，月，日
        /// </summary>
        /// <param name="StartTime"></param>
        /// <param name="End_Time"></param>
        /// <returns></returns>
        List<OrderInfo> SelYear(string StartTime, string EndTime);
        [OperationContract]
        List<OrderInfo> SelMonth(string StartTime, string EndTime, string YearTime);
        [OperationContract]
        List<OrderInfo> SelDay(string StartTime, string EndTime, string YearTime, string MonthTime);
        /// <summary>
        /// 根据ID获取订单状态
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        int GetByOrder(int id);
        #endregion        

        #region 库存管理
        /// <summary>
        /// 显示库存信息
        /// </summary>
        /// <param name="oo"></param>
        /// <returns></returns>
        [OperationContract]
        List<InventoryInformationInfo> ShowInventory();
        #endregion
       
        #region 快递匹配
        [OperationContract]
        /// <summary>
        /// 显示快递匹配
        /// </summary>
        /// <returns></returns>
        List<FORMDHLUPSInfo> FORMDHLUPSInfoShow(int did);
        [OperationContract]
        /// <summary>
        /// 快递匹配添加
        /// </summary>
        /// <param name="f"></param>
        /// <returns></returns>
        int FORMDHLUPSInfoAdd(int rid, string oid);
        [OperationContract]
        /// <summary>
        /// 快递匹配删除
        /// </summary>
        /// <param name="fdid"></param>
        /// <returns></returns>
        int FORMDHLUPSInfodDelete(int fdid);
        [OperationContract]
        /// <summary>
        /// 获取快递名称
        /// </summary>
        /// <returns></returns>
        List<DHLUPSFEDEXEMSInfo> kuaidiname();
        [OperationContract]
        /// <summary>
        /// 根据id获取城市
        /// </summary>
        /// <param name="pid"></param>
        /// <returns></returns>
        List<CityInfo> GetidCity(int pid);
        [OperationContract]
        /// <summary>
        /// 根据快递编号获取城市编号
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        List<FORMDHLUPSInfo> FORMDHLUPSInfoGetid(int rid);
        [OperationContract]
        /// <summary>
        /// 根据快递id删除所有的有关城市
        /// </summary>
        /// <param name="did"></param>
        /// <returns></returns>
        int kuaidisahnchu(int did);
        #endregion
    }
}
